﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Disposable_Empty_Should.cs" company="MyCoreLib">
//   Copyright (C) 2014 Alexey Evlampiev. All rights reserved.
// </copyright>
// <summary>
//   Defines the Disposable_Empty_Should type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MyCoreLib.UnitTest
{
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// <summary>
    /// Tests the <see cref="MyCoreLib.Disposable.Empty"/> property.
    /// </summary>
    [TestClass]
    public class Disposable_Empty_Should
    {
        /// <summary>
        /// Tests whether Disposable.Empty returns a singleton instance of IDisposable.
        /// </summary>
        [TestMethod]
        public void ReturnSingletonObject()
        {
            var obj = Disposable.Empty;
            Assert.IsTrue(ReferenceEquals(obj, Disposable.Empty), "Disposable.Empty static property should return asingleton intance of IDisposable");
        }
    }
}
